﻿@inherits BasePage
@page "/Task/List"

<Table TItem="JobModel" ShowLoading="true"
       ShowToolbar="true" ShowDefaultButtons="true" ShowAddButton="true"
       ShowExtendButtons="true" ShowEditButton="true" ShowDeleteButton="true"
       OnSaveAsync="OnSaveAsync" OnDeleteAsync="OnDeleteAsync"
       ShowSearch="true" ShowAdvancedSearch="false" ShowRefresh="true" IsStriped="true" IsBordered="true" ShowLineNo="true"
       IsPagination="true" OnQueryAsync="@OnQueryAsync">

    <TableColumns>
        <TableColumn @bind-Field="@context.Name" Text="任务名称" />
        <TableColumn @bind-Field="@context.Status" Text="状态" ComponentType="@typeof(Switch)" />
        <TableColumn @bind-Field="@context.IsRunning" Text="是否正在运行" Editable="false" />
        <TableColumn @bind-Field="@context.Url" Text="api地址"></TableColumn>
        <TableColumn @bind-Field="@context.LastStartTime" Text="最后开始时间" Editable="false"></TableColumn>
        <TableColumn @bind-Field="@context.LaseEndTime" Text="最后结束时间" Editable="false"></TableColumn>
    </TableColumns>
    <RowButtonTemplate Context="obj">
    </RowButtonTemplate>
</Table>
